home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 173 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: Max TenEyck Woodbury <mtew@cds.duke.edu>
  3. Newsgroups: comp.std.c++
  4. Subject: Time representations
  5. Date: 30 Jan 1996 20:24:13 PST
  6. Organization: Duke University Center for Demographic Studies
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4emq2k$ecu@news.duke.edu>
  9. NNTP-Posting-Host: isolde.mti.sgi.com
  10. X-Original-Date: 31 Jan 1996 04:09:55 GMT
  11. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBVAwUBMQ7vAEy4NqrwXLNJAQHWPgIAyDcbV5weUnyBGwaxBmOxnzT6ntmWDOZd
  14.     lJ2k6tsbkuZQtxx199oGs71wp5HQUDhyCb467nl70XrH+DRywYszCw==
  15.     =qJT8
  16. Originator: austern@isolde.mti.sgi.com
  17.  
  18.     The C++ standard incorporates the C standard for dates and times
  19. by reference.  There are at least three problems with the 'struct tm'
  20. definition in that standard.
  21.  
  22.     First, the range specified for tm_sec is 0-59.  While this is the
  23. normal range for almost all minutes, there are officially 'leap 
  24. seconds' that are declared from time to time.  The standard should
  25. reflect this possibility, even if it is almost always ignored in 
  26. practice.
  27.  
  28.     Second, there are cultures that operate on a lunar calendar,
  29. rather than on the Gregorian calendar.  They have 13 or more months
  30. a year.  The tm_mon range needs to reflect this.
  31.  
  32.     Third, there are cultures that do not start their year on January
  33. 1st.  This has an impact on the definition of tm_yday even though
  34. its range will not change.  There is a similar definitional problem
  35. with tm_year.
  36.  
  37.     There may also be a problem with tm_wday.  I vaguely remember 
  38. hearing about cycles of 17 or 19 days used in some cultural contexts
  39. that might have been in addition to or in place of the weekly cycle,
  40. but I can not remember the exact context.
  41.  
  42.         Max
  43. ---
  44. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  45.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  46.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  47.